home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / comm / irc / epic4-mos.lha / share / epic / script / sdiff < prev    next >
Text File  |  2002-09-18  |  393b  |  22 lines

  1. # Here's the plan
  2. #
  3. # $sdiff() -- convert bytes to kilobytes
  4. # $sdiff2() -- convert bytes to megabytes
  5. #
  6.  
  7. alias sdiff {
  8.     ^set floating_point on
  9.     ^local kb $trunc($1 ${[$0] / 1024})
  10.     @ function_return = kb ## [K]
  11.     ^set floating_point off
  12. }
  13.  
  14. alias sdiff2 {
  15.     ^set floating_point on
  16.     ^local mb $trunc($1 ${[$0] / (1024 * 1024)})
  17.     @ function_return = mb ## [mb]
  18.     ^set floating_point off
  19. }
  20.  
  21. #hop'97
  22.